﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;

namespace SimpleWebApi.MyMigration.Models.BusinessLicenseManagement
{
    // 所有实体类的基类
    public abstract class BaseEntity
    {
        [Comment("主键")]
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        [Comment("创建时间")]
        [Required]
        public DateTime CreateTime { get; set; } = DateTime.UtcNow;

        [Comment("修改时间")]
        public DateTime? LastModifyTime { get; set; }

        [Comment("软删除")]
        public bool IsDeleted { get; set; } = false;        
    }
}
